package com.control.qct.businesssteward.activity;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.control.qct.businesssteward.R;
import com.control.qct.businesssteward.adapter.EmployeeListAdapter;
import com.control.qct.businesssteward.base.BaseActivity;
import com.control.qct.businesssteward.model.EmployeeModel;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class EmployeeListActivity extends BaseActivity {
    @BindView(R.id.rv_store_select)
    RecyclerView mRvEmployee;
    private EmployeeListAdapter mEmployeeListAdapter;
    private List<EmployeeModel> mEmployeeModelList;

    public EmployeeListActivity() {
        super(R.layout.activity_store_select);
    }

    @Override
    protected void initView() {
        setLeftIcon(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        setTitle("员工列表");
        mRvEmployee.setLayoutManager(new LinearLayoutManager(this));
        mEmployeeListAdapter = new EmployeeListAdapter();
        mRvEmployee.setAdapter(mEmployeeListAdapter);
        setEmployeeList();
    }

    private void setEmployeeList(){
        mEmployeeModelList = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            mEmployeeModelList.add(new EmployeeModel());
        }
        mEmployeeListAdapter.addData(mEmployeeModelList);
    }
}
